package view.room;

import java.awt.Dimension;

import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import entity.Room;

public class RoomOperate extends JDialog{
	private JPanel jpAddRoom;
	private JPanel jpAddType;
	
	private JTextField tfRoomName 	= new JTextField(10);
	private JTextField tfTypeName 	= new JTextField(10);
	private JTextField tfCost 		= new JTextField(10);
	
	private JComboBox cbType 	= new JComboBox(new String[]{"Type 1","Type 2"});
	private JComboBox cbStatus 	= new JComboBox(new String[]{"Status 1", "Status 2"});
	
	entity.Room room;
	public RoomOperate(JFrame parent, String title, Room room){
		super(parent, title, true);
		this.room = room;
		setSize(600, 300);
		setLocationRelativeTo(parent);
		setResizable(false);
		
		initUI();
	}
	
	public void initUI(){
		
		jpAddRoom = new JPanel();
		jpAddRoom.setPreferredSize(new Dimension(300, 200));
		
		jpAddRoom.add(new JLabel("Tên phòng"));
		jpAddRoom.add(tfRoomName);
		jpAddRoom.add(new JLabel("Tình trạng"));
		jpAddRoom.add(cbStatus);
		jpAddRoom.add(new JLabel("Loại phòng"));
		jpAddRoom.add(cbType);
		
		
		add(jpAddRoom);
	}
	
	public Room showAndReturn(){
		setVisible(true);
		return room;
	}
}
